<div class="grid_9">

<?php if($this->session->flashdata('type')): ?>
	<div class="<?php echo $this->session->flashdata('type')?>"><?php echo $this->session->flashdata('msg')?></div>
<?php endif; ?>


<div class="inner-border">
<h6>View Room</h6>
<?php if(!empty($db_entries)):?>
	<?php 

		$formAttrib = array('id' => 'addroom', 'class' => 'admin-form');
		$roomCodeAttrib = array('name' => 'code', 'value' => $db_entries->code, 'id' => 'code', 'disabled' => 'disabled', 'class' => 'disabled room');
		$roomNameAttrib = array('name' => 'name', 'value' => $db_entries->name, 'id' => 'name', 'disabled' => 'disabled', 'class' => 'disabled room');
		$roomDescriptionAttrib = array('name' => 'description', $db_entries->description, 'id' => 'description', 'disabled' => 'disabled', 'class' => 'disabled room');
		echo form_open('admin/post_edit_room', $formAttrib);
		
	?>
    

	<?php echo form_checkbox(array('value' => 'room', 'class' => 'enable-edit'))?> Edit Room
    <?php echo form_hidden('room_id', $db_entries->room_id);?>
    <div class="input-block">
    <?php
		echo form_label('Room Code :', 'code');
		echo form_input($roomCodeAttrib);		
	?>
    </div>
	
    <div class="input-block">
    <?php
		echo form_label('Room Name :', 'name');
		echo form_input($roomNameAttrib);		
	?>
    </div>
    
	<div class="input-block">
    <?php
		echo form_label('Description :', 'description');
		echo form_textarea($roomDescriptionAttrib);	
	?>
    </div>
   
    <div class="input-block" style="clear:both;">
   		<?php echo form_submit(array('class' => 'hidden-btn submit', 'value' => 'Edit'), 'Edit'); ?>
		<a href="<?php echo site_url('admin/manage_rooms') ?>" class="btn">Back</a>	
    </div>
    
    <?php else: ?>
    <div class="error">Invalid room</div>
    
    <?php endif;?>
   </div>
</div>